
<template>
  <div class="export-success-box">
    <img :style="{'height':396*width/750+'px'}" :src="exportImage" alt="">
    <el-button type="primary" class="download" >  <a :href="downLoadUrl" >下载文件 </a> </el-button>
  </div>
</template>
<script>
let width = document.body.offsetWidth;
import { getLocalesOssUrl } from '@src/util/assets'
const exportImage = getLocalesOssUrl('/exportDownloadBanner.png')
export default {
  name: 'export-success',
  props: {
    initData: {
      type: Object,
      default: () => ({}),
    }
  },
  data() {
    return {
      width,
      exportImage
    };
  },
  computed: {
    // 下载文件
    downLoadUrl() {
      let protocol = window.location.protocol;
      let host = window.location.host;
      let url = `${protocol}//${host}/v_open/download/errorMessage?id=${this.initData.id}&tenantId=${this.initData.tenantId}`;
      return url;
    }

  },
  methods: {
  },
};
</script>
<style lang="scss">
.export-success-box {
  .download{
    height:50px;
    width: 60%;
    background: #12C3BE;
    border-radius: 4px;
    font-size:15px;
    margin: auto;
    display: block;
    margin-top: 22%;
    a{
      text-decoration: none;
      color: #fff;
    }
  }
  
  
}
</style>